home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-05
/
lanutsrc.zip
/
KC.C
< prev
next >
Wrap
Text File
|
1991-03-13
|
369b
|
22 lines
/* get keycode */
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
main () {
int done;
union REGS regs;
done = FALSE;
while (!done) {
puts("Press a key");
regs.x.ax = 0;
int86(0x16,®s,®s);
printf("Key code is Scan %x, Ascii %x.\n",regs.h.ah,regs.h.al);
if (regs.h.al == 27) done = TRUE;
}
}